import { useLocation } from 'react-router-dom'

const Login = () => {
  let location = useLocation()
  console.log('params:', location)
  let { name, age } = location.state
  return (
    <div>
      <div>this is login</div>
      {/* <div>参数:{location}</div> */}
      <div>参数:{name}</div>
      <div>参数:{age}</div>
    </div>
  )
}

export default Login
